from .oop import Singleton

class BoardRender():
    def __init__(self):
        pass

class Board(BoardRender,Singleton):
    def __init__(self):
        super().__init__()

        self.width = 8
        self.height = 8
        self.board = [[None for _ in range(self.width)] for _ in range(self.height)]

    def place_piece(self, piece):
        self.board[piece.y][piece.x] = piece

    def get_piece(self, x, y):
        return self.board[y][x]

    def is_null_piece(self, x, y):
        if self.get_piece(x,y) is None:
            return True
        return False
